<!DOCTYPE html><html lang="zh-CN" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>iOS版本管理之SVN | Albert Yuan's Blog</title><meta name="keywords" content="SVN"><meta name="author" content="Albert Yuan"><meta name="copyright" content="Albert Yuan"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta name="referrer" content="no-referrer"><meta name="description" content="一、基本使用1. 常用基础命令 svn checkout : 将服务器代码完整的下载到本地 svn commit : 将本地修改的内容（可运行版本）,提交到服务器 svn update : 将服务器最新的代码下载带本地   2. SVN使用环境 要想利用SVN管理源代码，必须得有2套环境：    服务器: 用于存储客户端上传的源代码 可以在Windows上安装Visual SVN Server">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS版本管理之SVN">
<meta property="og:url" content="https://yllove.gitee.io/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/index.html">
<meta property="og:site_name" content="Albert Yuan&#39;s Blog">
<meta property="og:description" content="一、基本使用1. 常用基础命令 svn checkout : 将服务器代码完整的下载到本地 svn commit : 将本地修改的内容（可运行版本）,提交到服务器 svn update : 将服务器最新的代码下载带本地   2. SVN使用环境 要想利用SVN管理源代码，必须得有2套环境：    服务器: 用于存储客户端上传的源代码 可以在Windows上安装Visual SVN Server">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img0.baidu.com/it/u=53708033,927619141&fm=26&fmt=auto&gp=0.jpg">
<meta property="article:published_time" content="2021-08-12T01:55:46.816Z">
<meta property="article:modified_time" content="2021-08-25T07:54:26.698Z">
<meta property="article:author" content="Albert Yuan">
<meta property="article:tag" content="iOS">
<meta property="article:tag" content="版本控制">
<meta property="article:tag" content="SVN">
<meta property="article:tag" content="Git">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img0.baidu.com/it/u=53708033,927619141&fm=26&fmt=auto&gp=0.jpg"><link rel="shortcut icon" href="/blog/img/favicon.png"><link rel="canonical" href="https://yllove.gitee.io/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta/><link rel="stylesheet" href="/blog/css/index.css"><link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.css" media="print" onload="this.media='all'"><script src="https://fastly.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.js" defer></script><script>const GLOBAL_CONFIG = { 
  root: '/blog/',
  algolia: {"appId":"X8NS0XSX99","apiKey":"b9d4530647c8b5bf7928a04c47752ad7","indexName":"albertyuan","hits":{"per_page":6},"languages":{"input_placeholder":"搜索文章","hits_empty":"找不到您查询的内容：${query}","hits_stats":"找到 ${hits} 条结果，用时 ${time} 毫秒"}},
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://fastly.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://fastly.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://fastly.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: true,
  isanchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'iOS版本管理之SVN',
  isPost: true,
  isHome: false,
  isHighlightShrink: true,
  isToc: true,
  postUpdate: '2021-08-25 15:54:26'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const fontSizeVal = saveToLocal.get('global-font-size')
    if (fontSizeVal !== undefined) {
      document.documentElement.style.setProperty('--global-font-size', fontSizeVal + 'px')
    }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.2.0"><link rel="alternate" href="/blog/atom.xml" title="Albert Yuan's Blog" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="/blog/img/favicon.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">155</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">56</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">32</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://img0.baidu.com/it/u=53708033,927619141&amp;fm=26&amp;fmt=auto&amp;gp=0.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/blog/">Albert Yuan's Blog</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">iOS版本管理之SVN</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-08-12T01:55:46.816Z" title="发表于 2021-08-12 09:55:46">2021-08-12</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-08-25T07:54:26.698Z" title="更新于 2021-08-25 15:54:26">2021-08-25</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/blog/categories/%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6/">版本控制</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">3.6k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>11分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="iOS版本管理之SVN"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><meta name="referrer" content="no-referrer">

<h3 id="一、基本使用"><a href="#一、基本使用" class="headerlink" title="一、基本使用"></a>一、基本使用</h3><h4 id="1-常用基础命令"><a href="#1-常用基础命令" class="headerlink" title="1. 常用基础命令"></a>1. 常用基础命令</h4><ul>
<li>svn checkout : 将服务器代码完整的下载到本地</li>
<li>svn commit : 将本地修改的内容（可运行版本）,提交到服务器</li>
<li>svn update : 将服务器最新的代码下载带本地</li>
</ul>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/1.png" alt="基本流程"></p>
<h4 id="2-SVN使用环境"><a href="#2-SVN使用环境" class="headerlink" title="2. SVN使用环境"></a>2. SVN使用环境</h4><ul>
<li>要想利用SVN管理源代码，必须得有2套环境：</li>
</ul>
<blockquote>
<ul>
<li>服务器:<ol>
<li>用于存储客户端上传的源代码</li>
<li>可以在Windows上安装Visual SVN Server</li>
<li>大部分情况下，公司的开发人员不必亲自搭建SVN服务器</li>
</ol>
</li>
</ul>
</blockquote>
<blockquote>
<ul>
<li>客户端<ol>
<li>上传本地的源代码到服务器，或者更新服务器的代码到本地，保持同步</li>
<li>可以在Mac上使用命令行、Cornerstone、Xcode、Versions</li>
<li>开发人员就属于客户端这个角色</li>
</ol>
</li>
</ul>
</blockquote>
<hr>
<h3 id="二、服务器端配置：Mac版"><a href="#二、服务器端配置：Mac版" class="headerlink" title="二、服务器端配置：Mac版"></a>二、服务器端配置：Mac版</h3><blockquote>
<p>svn –version 查看本地SVN版本，没有则需要安装</p>
<p> brew install subversion：SVN安装</p>
</blockquote>
<h4 id="1-创建代码仓库：用来存储客户端所上传的代码"><a href="#1-创建代码仓库：用来存储客户端所上传的代码" class="headerlink" title="1. 创建代码仓库：用来存储客户端所上传的代码"></a>1. 创建代码仓库：用来存储客户端所上传的代码</h4><ul>
<li><p>创建svn目录: </p>
<ol>
<li>使用终端或者直接在Finder中创建想要存放svn的路径，比如在当前用户目录下新建，以后可以在svn目录下创建多个仓库目录： mkdir svn</li>
<li>svnadmin create &#x2F;Users&#x2F;你的MAC电脑的用户名&#x2F;svn&#x2F;projectName</li>
</ol>
<blockquote>
<p>不能在“&#x2F;Users&#x2F;用户名&#x2F;别的文件夹”下面建立“&#x2F;svn”，否则localhost会识别不出来，在“&#x2F;Users&#x2F;用户名下”建立“&#x2F;svn”，再在“&#x2F;svn”下建立svn库，就可以识别</p>
</blockquote>
</li>
</ul>
<h4 id="2-配置svn的用户权限"><a href="#2-配置svn的用户权限" class="headerlink" title="2. 配置svn的用户权限"></a>2. 配置svn的用户权限</h4><ul>
<li><p>配置读写权限</p>
<p>用文本编辑器，打开svn&#x2F;conf&#x2F;svnserve.conf，将下列配置项前面的#和空格都去掉</p>
<blockquote>
<ul>
<li><p><strong>anon-access &#x3D; read</strong>: 表示匿名访问的时候是只读的;改为anon-access &#x3D; none，禁止匿名访问，需要帐号密码才能访问;控制非鉴权用户访问版本库的权限，取值范围为 “write”、”read” 和 “none”。 即 “write” 为可读可写，”read” 为只读，”none” 表示无访问权限，默认值：read</p>
</li>
<li><p><strong>auth-access &#x3D; write:</strong> 控制鉴权用户访问版本库的权限。取值范围为 “write”、”read” 和 “none”。 即”write”为可读可写，”read”为只读，”none”表示无访问权限，默认值：write</p>
</li>
<li><p><strong>password-db &#x3D; passwd</strong>:访问方式密码</p>
</li>
<li><p><strong>authz-db &#x3D; authz</strong>：指定权限配置文件名，通过该文件可以实现以路径为基础的访问控制。 除非指定绝对路径，否则文件位置为相对conf目录的相对路径，默认值：authz。</p>
</li>
</ul>
</blockquote>
</li>
<li><p>添加用户</p>
</li>
</ul>
<p>打开目录下的svn&#x2F;conf&#x2F;passwd文件，在[users]下面添加用户和密码，等号左边是用户名，右边是密码，需要添加新用户，就另起一行</p>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/2.png" alt="add new user"></p>
<ul>
<li>配置用户组和权限</li>
</ul>
<p>打开目录下的svn&#x2F;conf&#x2F;authz文件，将在passwd里添加的用户分配到不同的用户组，方便管理权限。</p>
<ol>
<li>分组:在[groups]下面添加组名和用户名，多个用户之间用逗号(,)隔开，同样等号左边是组名，右边是用户名</li>
</ol>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/3.png" alt="groups"></p>
<p>2 .分组权限配置:使用[&#x2F;]代表svn服务器中的所有资源库</p>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/4.png" alt="分组权限控制"></p>
<ul>
<li>启动svn服务器</li>
</ul>
<blockquote>
<p> svnserve -d -r &#x2F;Users&#x2F;albertyuan&#x2F;svn&#x2F;prectice  ：-r直接指定到版本库(称之为单库svnserve方式)</p>
<p>svnserve -d -r &#x2F;Users&#x2F;albertyuan&#x2F;svn :指定到版本库的上级目录(称之为多库svnserve方式)</p>
<p>可以在mac系统自带的实用工具里面的“活动监视器”查看svn启动状态</p>
</blockquote>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/5.png" alt="SVN服务器启动状态查看"></p>
<h4 id="3-客户端链接服务器配置"><a href="#3-客户端链接服务器配置" class="headerlink" title="3. 客户端链接服务器配置"></a>3. 客户端链接服务器配置</h4><p>启动svn</p>
<ul>
<li><p>在终端输入下列指令：svnserve -d -r &#x2F;Users&#x2F;你电脑的用户名&#x2F;svn</p>
</li>
<li><p>打开Cornerstone，点击Add Repository，如下：</p>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/6.png" alt="connerStone链接配置"></p>
</li>
</ul>
<h4 id="4-在SVN中存放代码"><a href="#4-在SVN中存放代码" class="headerlink" title="4. 在SVN中存放代码"></a>4. 在SVN中存放代码</h4><blockquote>
<p>.在代码库中，新建文件夹，在cornersotone的空白处右击，出现如下信息：</p>
</blockquote>
<p><img src= "" data-lazy-src="https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2019/8/3/16c581237753937b~tplv-t2oaga2asx-watermark.awebp"></p>
<blockquote>
<p>弹窗中，输入文件夹名称，勾选表示创建trunk,branches,tags路径，不勾选什么都不会创建</p>
</blockquote>
<p><img src= "" data-lazy-src="https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2019/8/3/16c5812384872e1a~tplv-t2oaga2asx-watermark.awebp"></p>
<blockquote>
<p> 填写修改日志后，continue</p>
</blockquote>
<p><img src= "" data-lazy-src="https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2019/8/3/16c581238b5a43af~tplv-t2oaga2asx-watermark.awebp"></p>
<p>这样，文件夹就建好了。此时我们就可以往svn上传项目了。</p>
<hr>
<h3 id="三、svn客户端操作命令简介"><a href="#三、svn客户端操作命令简介" class="headerlink" title="三、svn客户端操作命令简介"></a>三、svn客户端操作命令简介</h3><ul>
<li>svn checkout ：下载服务器的代码到本地 （简写<strong>svn co</strong>）</li>
</ul>
<blockquote>
<p>svn checkout <a target="_blank" rel="noopener" href="https://192.168.1.106/svn/Weibo/">https://192.168.1.106/svn/Weibo/</a>  &#x2F;Users&#x2F;Documents&#x2F;workspace</p>
<ul>
<li>第一段路劲代表的是：代码仓库的远程地址</li>
<li>第二段路劲代表的是：将代码下载到本地的哪个路径</li>
<li>如果省略第二段路径，就下载到命令行当前所在的路径</li>
</ul>
</blockquote>
<ul>
<li>svn commit ：将改动的文件提交到服务器（简写<strong>svn ci</strong>）</li>
</ul>
<blockquote>
<p>svn commit  -m “修改了User.m文件” &#x2F;Users&#x2F;Desktop&#x2F;workspace&#x2F;Weibo&#x2F;branches&#x2F;User.m</p>
<ul>
<li>路径代表的是：提交哪个文件到服务器</li>
<li>如果省略路径，就将命令行所在路径中所有改动过的文件提交到服务器</li>
</ul>
</blockquote>
<ul>
<li><p><code>svn update ：更新服务器的代码到本地 （简写**svn up**）</code></p>
<blockquote>
<ul>
<li><strong>将文件恢复回退至服务器某个版本（只会回退服务器版本）</strong>:  svn update -r 版本号 [PATH]</li>
</ul>
</blockquote>
</li>
<li><p><code>svn revert ：撤销之前的一切本地修改（只会回退本地版本）：svn revert 文件名</code></p>
</li>
<li><p>svn add ：向本地的版本控制库中添加新文件</p>
</li>
</ul>
<blockquote>
<p>如果直接提交一个没有添加到本地版本控制库中的文件，会报下面的错误:lis not a working copy</p>
</blockquote>
<ul>
<li><p><strong>svn delete、svn remove ：从本地的版本控制库中删除文件（简写svn del、svn rm</strong>）</p>
<blockquote>
<ul>
<li><p>将文件从本地的版本控制库中移除：svn delete PATH 、svn remove </p>
</li>
<li><p>提交刚才的删除操作到服务器：svn commit</p>
</li>
</ul>
</blockquote>
</li>
<li><p>svn move ：移动文件或者目录或文件更名</p>
</li>
<li><p><strong>svn mkdir ：创建纳入版本控制下的新目录</strong></p>
</li>
<li><p><strong>svn merge ：将两个版本之间的差异合并到当前文件</strong></p>
</li>
<li><p><strong>svn info ：查看文件的详细信息</strong> </p>
</li>
<li><p><strong>svn diff ：查看不同版本的区别</strong></p>
</li>
<li><p>svn log ：查看日志信息</p>
</li>
<li><p>svn list ：列出版本库下的文件和目录列表</p>
</li>
<li><p>svn status ：查看文件状态（简写<strong>svn st</strong>）</p>
<blockquote>
<p>‘?’ 文件没有被添加到本地版本库内,不在SVN的管理之下</p>
<p>‘A’ 被添加到本地代码仓库，但是该文件在本地还没有上传到服务器中</p>
<p>‘D’ 该文件本地已删除，但服务器依然存在，删除操作为同步到服务器中</p>
<p>‘M’ 该文件在本地已经修改，未上传到服务器</p>
<p>‘G’ 产生冲突后,更新操作去解决冲突,相当于进行合并</p>
<p>‘U’ 更新最新的代码到本地(本地有文件的情况下)</p>
<p>‘ ‘ 没有修改</p>
<p>‘C’ 冲突</p>
<p>‘I’ 被忽略</p>
<p>‘R’ 被替换</p>
<p>‘X’ 外部定义创建的版本目录</p>
<p>‘!’ 文件丢失或者不完整(不识别该文件)</p>
<p>‘~’ 受控文件被其他文件阻隔</p>
</blockquote>
</li>
<li><p>svn help ：获取帮助信息（比如svn help ci）</p>
</li>
<li><p>svn lock ：加锁</p>
</li>
<li><p>svn unlock ：解锁</p>
</li>
</ul>
<h5 id="使用问题总结："><a href="#使用问题总结：" class="headerlink" title="使用问题总结："></a>使用问题总结：</h5><blockquote>
<ul>
<li><p>去到公司的第一天，下载公司的代码到电脑上 : svn checkout</p>
</li>
<li><p>修改了某个早已存在的旧文件，然后提交到服务器: svn commit</p>
</li>
<li><p>提交一个自己新建的文件到服务器:  svn add  svn commit</p>
</li>
<li><p>删除一个早已存在的旧文件，然后同步到服务器上:  svn delete  svn commit</p>
</li>
<li><p>将其他同事提交的新代码更新到自己电脑上:  svn update</p>
</li>
<li><p>版本回退</p>
<blockquote>
<ul>
<li>不小心写错了很多东西，想撤销所写的东西（还未把修改提交到服务器）: svn revert  path需要回退的文件路劲</li>
<li>不小心删错了文件，想把文件恢复回来（还未把删除提交到服务器）: svn revert</li>
<li>不小心写错了很多东西，想撤销所写的东西（已经把修改提交到服务器）: svn update -r 版本号</li>
<li>不小心删错了文件，想把文件恢复回来（已经把删除提交到服务器）:  svn update -r 版本号</li>
</ul>
</blockquote>
</li>
</ul>
</blockquote>
<p><strong>注意：.svn这个隐藏目录记录着非常关键的信息；千万不要手工修改或删除这个 .svn隐藏目录和里面的文件！ 否则将会导致本地的工作副本被破坏，无法再进行操作</strong></p>
<h3 id="代码提交问题与冲突问题解决流程："><a href="#代码提交问题与冲突问题解决流程：" class="headerlink" title="代码提交问题与冲突问题解决流程："></a><strong>代码提交问题与冲突问题解决流程：</strong></h3><p>①、A、B同时开发发布问题：<strong>out of date</strong> </p>
<blockquote>
<ul>
<li>A.B同时更新最新的代码开发，版本6，这时A开发完成，提交新版到服务器，服务器版本更新到7；如果B在完成提交，会报错（out of date ,过期，本地版本号低于服务器版本），此时B需要先update更新本地版本，然后在提交。</li>
</ul>
</blockquote>
<hr>
<p>②、<strong>将文件恢复回退至某个版本</strong>:  svn update -r 版本号 [PATH]</p>
<blockquote>
<ol>
<li>假设服务器版本是7，但是有问题(上传错误文件了)，可以回退到第6个版本（<strong>确保回退版本是所需的版本</strong>）：svn update -r6</li>
<li>本地更新到最新的版本(<strong>提高本地版本号</strong>，解决版本过低无法上传问题，但此时会存在有问题的文件)：svn update </li>
<li>问题文件合并，格式固定：目标版本文件回退合并到指定版本的文件，解决有问题的文件：svn merge -r7:6 xxxxx.h</li>
</ol>
</blockquote>
<hr>
<p><strong>③、代码冲突：</strong></p>
<ul>
<li>df : 在命令⾏行中展⽰示所有的不同（diff-full）</li>
<li>e : 在命令⾏行中来编辑冲突（不推荐edit）</li>
<li>mc: 用我的本地的代码来覆盖服务器的代码(mine-conflict)</li>
<li>tc : 用服务器的代码来覆盖我的代码(theirs-conflict)</li>
<li>p : 延迟解决冲突,展⽰示所有冲突的文件,手动解决冲突(postpone) -&gt; svn resolved person.h</li>
</ul>
<blockquote>
<ol>
<li>A.B同时开发，修改同一份文件发生冲突：假设A先提交了，B（新员工）在提交前update下来后发现有冲突存在，需要解决。</li>
</ol>
<ul>
<li>B的解决方案：B采用 tc 服务器代码覆盖本地：本地修改被替换掉了！！需要将被覆盖的部分重新添加修改在上传到服务器（ci）（思考会存在什么问题？？？）</li>
</ul>
<ol start="2">
<li>A需要再次在该文件做出修改，并提交，此时由于B提交过新版本，A会遇到out of date 问题，A在update后也会出现冲突（因为B修改了该文件），需要A做出冲突解决操作。如果A（老员工）此时采用 mc 方式，可以解决冲突问题并上传成功，但是此时会将B提交的部分覆盖掉，B更新服务器最新版本后会发现自己的修改不存在了（老员工欺负新员工~~）。（思考如何解决这个问题？）</li>
</ol>
<ul>
<li>A的解决方案一：A采用mc 本地覆盖服务器代码：服务器修改被替换掉了！！（B会遇到修改消失问题）</li>
</ul>
<ol start="3">
<li>p冲突解决的使用：</li>
</ol>
<blockquote>
<ul>
<li>svn resolved person.h :在使用p标明延迟解决冲突<strong>并手动完成解决冲突</strong>（确保A、B的代码都能保留）的操作后，使用 <strong>svn resolved 文件名</strong>来表示冲突已经解决了</li>
</ul>
</blockquote>
</blockquote>
<p>注：如何避免冲突：</p>
<ul>
<li><strong>尽量在修改⽂文件之前,先update</strong></li>
<li><strong>如果修改公共⽂文件,最好跟同事说⼀一声,让他先别修改,修改完之后,让他更新</strong>！！</li>
</ul>
<hr>
<h3 id="四、客户端软件使用：Cornerstone"><a href="#四、客户端软件使用：Cornerstone" class="headerlink" title="四、客户端软件使用：Cornerstone"></a>四、客户端软件使用：Cornerstone</h3><ul>
<li><p>xcode提交需要忽略的文件：</p>
<blockquote>
<ol>
<li>xcode会默认记录之前停留⽂文件,下次打开依然停留在该⽂文件,这个不需要共享 </li>
<li>xcode会默认记录之前目录的打开情况,同事不需要共享</li>
<li>断点信息,不需要进⾏行共享 </li>
<li><code>xcuserdata</code>都在这个文件中，直接忽略这个文件就可以！</li>
</ol>
</blockquote>
</li>
<li><p>xcode中使⽤用svn的注意点：</p>
<blockquote>
<p>1&gt; <strong>如果使用到静态库需要特别注意,必须使用命令⾏行将静态库添加到svn的管理之 下</strong></p>
<p>2&gt; <strong>如果使⽤用到了storyboard也需要特别注意</strong>:如果能使用xib,尽量使用xib 如果在项目当中使用到了storyboard,尽量保证只有一个人在操作storyboard</p>
<p>3&gt; checkout的⽅式 使⽤命令⾏:使用cornerstone(图形化界⾯面⼯工具) Xcode</p>
<p>4&gt; 公司开发技巧(避免冲突) 尽量写一些代码就提交到服务器,时跟服务器的代码保持同步 尽量提前半小时提交代码</p>
</blockquote>
</li>
</ul>
<hr>
<h3 id="五、与Xcode的集成使用"><a href="#五、与Xcode的集成使用" class="headerlink" title="五、与Xcode的集成使用"></a>五、与Xcode的集成使用</h3><p>Subversion is removed from macOS or Xcode Command Line tools.Xcode不在集成SVN</p>
<hr>
<h3 id="六、SVN目录规范"><a href="#六、SVN目录规范" class="headerlink" title="六、SVN目录规范"></a>六、SVN目录规范</h3><h5 id="正规项目的SVN目录结构一般有3个文件夹"><a href="#正规项目的SVN目录结构一般有3个文件夹" class="headerlink" title="正规项目的SVN目录结构一般有3个文件夹"></a>正规项目的SVN目录结构一般有3个文件夹</h5><ul>
<li>trunk：主干，当前开发项目的主目录</li>
<li>branches：分支目录，添加非主线功能时使用，开发测试之后，可以合并到主干项目中</li>
<li>tags：标记目录，通常作为重大版本的备份</li>
</ul>
<p>应用案列：</p>
<blockquote>
<ol>
<li><p>某团队计划开发一款”陌陌”项目</p>
</li>
<li><p>此项目初期已经有部分基础代码</p>
</li>
<li><p>研发团队在此基础代码上经过3个月的努力，开发了一个功能相对完备的V1.0版本上线推广，并取得了良好的效果(<strong>备份Tags</strong>)</p>
</li>
<li><p>由于市场反馈良好，团队开始着手V2.0版本的开发工作</p>
</li>
<li><p>就在V2.0版本开发进行中，发现V1.0版本中有一个严重的BUG，如果不及时修改，将造成严重的后果</p>
</li>
<li><p>研发团队收到BUG报告后，立刻安排人员对V1.0版本进行修复(<strong>建立分支Branche</strong>s)，但其他研发人员则继续开发V2.0版本的新功能</p>
</li>
<li><p>修复BUG的人员很快就找到问题原因并对问题进行了修复，并且发布了V1.1版本供用户升级，因此没有造成重大损失</p>
</li>
<li><p>BUG修复后，研发人员将修复后的代码整合到研发主线中来（<strong>Brunches合并到Trunk</strong>），这样就可以保证今后发布的后续版本中不会再出现此问题</p>
<p>就这样，整个团队在大家的共同努力下，有条不紊地进行着……</p>
</li>
</ol>
</blockquote>
<p>注：备份Tags、建立分支Branches都是在服务器目录下，而不是在工作区（workcopy）下。</p>
<p><img src= "" data-lazy-src="/blog/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/7.png" alt="svn目录结构使用图"></p>
<blockquote>
<p>如果在Mac上使用ConnerStone进行合并出现：“遇到不可读的路径，拒绝访问”的问题，可采用一下解决方案：</p>
<ul>
<li>在项目的conf&#x2F;svnserve.conf 中, 设置 anon-access &#x3D; none 即可. 然后重启Subversion 服务.</li>
</ul>
</blockquote>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">Albert Yuan</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://yllove.gitee.io/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/">https://yllove.gitee.io/2021/08/12/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E4%B9%8BSVN/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://yllove.gitee.io" target="_blank">Albert Yuan's Blog</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/blog/tags/iOS/">iOS</a><a class="post-meta__tags" href="/blog/tags/%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6/">版本控制</a><a class="post-meta__tags" href="/blog/tags/SVN/">SVN</a><a class="post-meta__tags" href="/blog/tags/Git/">Git</a></div><div class="post_share"><div class="social-share" data-image="https://img0.baidu.com/it/u=53708033,927619141&amp;fm=26&amp;fmt=auto&amp;gp=0.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://fastly.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/blog/2021/08/11/iOS%20UIKIt/iOSUITabBarContrller%E8%AF%A6%E8%A7%A3/"><img class="prev-cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimages2015.cnblogs.com%2Fblog%2F877749%2F201602%2F877749-20160202134709194-1710798604.png&amp;refer=http%3A%2F%2Fimages2015.cnblogs.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1631242411&amp;t=6c8a605550b8da493ae89b30e55f1a65" onerror="onerror=null;src='/blog/img/defaultCover.gif'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">iOSUITabBarContrller详解与使用</div></div></a></div><div class="next-post pull-right"><a href="/blog/2021/08/13/iOS%20UIKIt/ios%E4%B8%AD%E7%9A%84%E5%83%8F%E7%B4%A0/"><img class="next-cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01ab1159035480a8012145504908ad.jpg%401280w_1l_2o_100sh.jpg&amp;refer=http%3A%2F%2Fimg.zcool.cn&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=jpeg?sec=1631416764&amp;t=b49c3a243c22c3e742cf19d21c227a39" onerror="onerror=null;src='/blog/img/defaultCover.gif'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">iOS尺寸单位pt、ppi与px之间换算关系</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/blog/2021/08/23/版本管理/ios版本管理之Git/" title=""><img class="cover" src= "" data-lazy-src="https://img0.baidu.com/it/u=1125669233,2191695094&fm=26&fmt=auto&gp=0.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-08-23</div><div class="title"></div></div></a></div><div><a href="/blog/2021/08/16/版本管理/Github新安全措施personal-access-token/" title="Github新安全措施personal access token"><img class="cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic4.zhimg.com%2Fv2-db1f1fcf15e3bd5a2c0414c1e992193f_r.jpg&refer=http%3A%2F%2Fpic4.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631689735&t=63c232fc7eebf355d80afc1c782e224a" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-08-16</div><div class="title">Github新安全措施personal access token</div></div></a></div><div><a href="/blog/2021/09/26/iOS UIKIt/UIDynamic动态物理引擎/" title="UIDynamic动态物理引擎"><img class="cover" src= "" data-lazy-src="https://img0.baidu.com/it/u=1254289242,26520186&fm=26&fmt=auto" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-09-26</div><div class="title">UIDynamic动态物理引擎</div></div></a></div><div><a href="/blog/2021/09/08/iOS UIKIt/UIViewContentMode属性详解/" title="UIViewContentMode属性详解"><img class="cover" src= "" data-lazy-src="https://img1.baidu.com/it/u=2815189064,4171169784&fm=26&fmt=auto&gp=0.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-09-08</div><div class="title">UIViewContentMode属性详解</div></div></a></div><div><a href="/blog/2021/09/24/iOS UIKIt/iOSUIKit之UIWindow详解/" title="iOSUIKit之UIWindow详解"><img class="cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimages2018.cnblogs.com%2Fblog%2F749924%2F201807%2F749924-20180730112644434-125751676.png&refer=http%3A%2F%2Fimages2018.cnblogs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1635046008&t=fd235aaa9fc1476b26197b2443c90864" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-09-24</div><div class="title">iOSUIKit之UIWindow详解</div></div></a></div><div><a href="/blog/2021/08/11/iOS UIKIt/iOSUITabBarContrller详解/" title="iOSUITabBarContrller详解与使用"><img class="cover" src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimages2015.cnblogs.com%2Fblog%2F877749%2F201602%2F877749-20160202134709194-1710798604.png&refer=http%3A%2F%2Fimages2015.cnblogs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631242411&t=6c8a605550b8da493ae89b30e55f1a65" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-08-11</div><div class="title">iOSUITabBarContrller详解与使用</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "" data-lazy-src="/blog/img/favicon.png" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Albert Yuan</div><div class="author-info__description">博学之,审问之,慎思之,明辨之,笃行之</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">155</div></a></div><div class="card-info-data-item is-center"><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">56</div></a></div><div class="card-info-data-item is-center"><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">32</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/yuanliangYL"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/yuanliangYL" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:yuanliangios@163.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="qq:1023817403" target="_blank" title="QQ"><i class="fab fa-qq"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">love cat , love life</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%80%E3%80%81%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8"><span class="toc-text">一、基本使用</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-%E5%B8%B8%E7%94%A8%E5%9F%BA%E7%A1%80%E5%91%BD%E4%BB%A4"><span class="toc-text">1. 常用基础命令</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-SVN%E4%BD%BF%E7%94%A8%E7%8E%AF%E5%A2%83"><span class="toc-text">2. SVN使用环境</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BA%8C%E3%80%81%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%AB%AF%E9%85%8D%E7%BD%AE%EF%BC%9AMac%E7%89%88"><span class="toc-text">二、服务器端配置：Mac版</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-%E5%88%9B%E5%BB%BA%E4%BB%A3%E7%A0%81%E4%BB%93%E5%BA%93%EF%BC%9A%E7%94%A8%E6%9D%A5%E5%AD%98%E5%82%A8%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%89%80%E4%B8%8A%E4%BC%A0%E7%9A%84%E4%BB%A3%E7%A0%81"><span class="toc-text">1. 创建代码仓库：用来存储客户端所上传的代码</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-%E9%85%8D%E7%BD%AEsvn%E7%9A%84%E7%94%A8%E6%88%B7%E6%9D%83%E9%99%90"><span class="toc-text">2. 配置svn的用户权限</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-%E5%AE%A2%E6%88%B7%E7%AB%AF%E9%93%BE%E6%8E%A5%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%85%8D%E7%BD%AE"><span class="toc-text">3. 客户端链接服务器配置</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-%E5%9C%A8SVN%E4%B8%AD%E5%AD%98%E6%94%BE%E4%BB%A3%E7%A0%81"><span class="toc-text">4. 在SVN中存放代码</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%89%E3%80%81svn%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%93%8D%E4%BD%9C%E5%91%BD%E4%BB%A4%E7%AE%80%E4%BB%8B"><span class="toc-text">三、svn客户端操作命令简介</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93%EF%BC%9A"><span class="toc-text">使用问题总结：</span></a></li></ol></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BB%A3%E7%A0%81%E6%8F%90%E4%BA%A4%E9%97%AE%E9%A2%98%E4%B8%8E%E5%86%B2%E7%AA%81%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3%E6%B5%81%E7%A8%8B%EF%BC%9A"><span class="toc-text">代码提交问题与冲突问题解决流程：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9B%9B%E3%80%81%E5%AE%A2%E6%88%B7%E7%AB%AF%E8%BD%AF%E4%BB%B6%E4%BD%BF%E7%94%A8%EF%BC%9ACornerstone"><span class="toc-text">四、客户端软件使用：Cornerstone</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BA%94%E3%80%81%E4%B8%8EXcode%E7%9A%84%E9%9B%86%E6%88%90%E4%BD%BF%E7%94%A8"><span class="toc-text">五、与Xcode的集成使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%85%AD%E3%80%81SVN%E7%9B%AE%E5%BD%95%E8%A7%84%E8%8C%83"><span class="toc-text">六、SVN目录规范</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E6%AD%A3%E8%A7%84%E9%A1%B9%E7%9B%AE%E7%9A%84SVN%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E4%B8%80%E8%88%AC%E6%9C%893%E4%B8%AA%E6%96%87%E4%BB%B6%E5%A4%B9"><span class="toc-text">正规项目的SVN目录结构一般有3个文件夹</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/blog/2023/02/07/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS-%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BD%91%E9%A1%B5%E4%B8%8B%E8%BD%BDIPA%E5%8C%85/" title="iOS 自定义网页下载IPA包"><img src= "" data-lazy-src="https://img.mp.itc.cn/upload/20170409/1a8f793d7282451cbd1beb6841608c90_th.jpeg" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="iOS 自定义网页下载IPA包"/></a><div class="content"><a class="title" href="/blog/2023/02/07/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS-%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BD%91%E9%A1%B5%E4%B8%8B%E8%BD%BDIPA%E5%8C%85/" title="iOS 自定义网页下载IPA包">iOS 自定义网页下载IPA包</a><time datetime="2023-02-07T02:46:29.851Z" title="更新于 2023-02-07 10:46:29">2023-02-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2023/02/06/Flutter/Flutter%E6%8E%A5%E5%85%A5%E5%8E%9F%E7%94%9F-iOS/" title="flutter接入原生-iOS"><img src= "" data-lazy-src="https://pic4.zhimg.com/v2-6a115fea4db1ad770dccf4119bfab36f_1440w.jpg?source=172ae18b" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="flutter接入原生-iOS"/></a><div class="content"><a class="title" href="/blog/2023/02/06/Flutter/Flutter%E6%8E%A5%E5%85%A5%E5%8E%9F%E7%94%9F-iOS/" title="flutter接入原生-iOS">flutter接入原生-iOS</a><time datetime="2023-02-07T01:18:53.661Z" title="更新于 2023-02-07 09:18:53">2023-02-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/12/17/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS%20%E5%A6%82%E4%BD%95%E5%9C%A8%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%AD%E5%AE%89%E8%A3%85APP/" title="iOS 如何在模拟器中安装APP"><img src= "" data-lazy-src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.winwin7.com%2Fuploadfile%2F2021%2F0114%2F20210114141748239.jpg&amp;refer=http%3A%2F%2Fwww.winwin7.com&amp;app=2002&amp;size=f9999,10000&amp;q=a80&amp;n=0&amp;g=0n&amp;fmt=auto?sec=1673854539&amp;t=aad2108ffb799b04e94a28cc58f038f1" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="iOS 如何在模拟器中安装APP"/></a><div class="content"><a class="title" href="/blog/2022/12/17/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/iOS%20%E5%A6%82%E4%BD%95%E5%9C%A8%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%AD%E5%AE%89%E8%A3%85APP/" title="iOS 如何在模拟器中安装APP">iOS 如何在模拟器中安装APP</a><time datetime="2022-12-17T07:48:56.594Z" title="更新于 2022-12-17 15:48:56">2022-12-17</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2021/08/05/Swift/swift%E5%B8%B8%E7%94%A8%E4%B8%89%E6%96%B9%E5%BA%93/" title="swift常用三方库"><img src= "" data-lazy-src="https://photos.infinum.com/store/b558bd40787ecad225d9c66322f14522" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="swift常用三方库"/></a><div class="content"><a class="title" href="/blog/2021/08/05/Swift/swift%E5%B8%B8%E7%94%A8%E4%B8%89%E6%96%B9%E5%BA%93/" title="swift常用三方库">swift常用三方库</a><time datetime="2022-12-16T06:37:20.115Z" title="更新于 2022-12-16 14:37:20">2022-12-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/12/12/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/GCD%E8%BF%9B%E9%98%B6%E4%B9%8BDispatchWorkItem%E5%92%8CDispatchGroup/" title="GCD进阶之DispatchWorkItem和DispatchGroup"><img src= "" data-lazy-src="/blog/img/defaultCover.png" onerror="this.onerror=null;this.src='/blog/img/defaultCover.gif'" alt="GCD进阶之DispatchWorkItem和DispatchGroup"/></a><div class="content"><a class="title" href="/blog/2022/12/12/iOS%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6/GCD%E8%BF%9B%E9%98%B6%E4%B9%8BDispatchWorkItem%E5%92%8CDispatchGroup/" title="GCD进阶之DispatchWorkItem和DispatchGroup">GCD进阶之DispatchWorkItem和DispatchGroup</a><time datetime="2022-12-12T07:19:37.277Z" title="更新于 2022-12-12 15:19:37">2022-12-12</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://img0.baidu.com/it/u=53708033,927619141&amp;fm=26&amp;fmt=auto&amp;gp=0.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By Albert Yuan</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">Hi, welcom to my  blog</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="font-plus" type="button" title="放大字体"><i class="fas fa-plus"></i></button><button id="font-minus" type="button" title="缩小字体"><i class="fas fa-minus"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="algolia-search"><div class="search-dialog"><div class="search-dialog__title" id="algolia-search-title">Algolia</div><div id="algolia-input-panel"><div id="algolia-search-input"></div></div><hr/><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-stats"></div></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/blog/js/utils.js"></script><script src="/blog/js/main.js"></script><script src="https://fastly.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="/blog/js/search/algolia.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>if (!window.MathJax) {
  window.MathJax = {
    tex: {
      inlineMath: [ ['$','$'], ["\\(","\\)"]],
      tags: 'ams'
    },
    chtml: {
      scale: 1.2
    },
    options: {
      renderActions: {
        findScript: [10, doc => {
          for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
            const display = !!node.type.match(/; *mode=display/)
            const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display)
            const text = document.createTextNode('')
            node.parentNode.replaceChild(text, node)
            math.start = {node: text, delim: '', n: 0}
            math.end = {node: text, delim: '', n: 0}
            doc.math.push(math)
          }
        }, ''],
        insertScript: [200, () => {
          document.querySelectorAll('mjx-container:not\([display]\)').forEach(node => {
            const target = node.parentNode
            if (target.nodeName.toLowerCase() === 'li') {
              target.parentNode.classList.add('has-jax')
            } else {
              target.classList.add('has-jax')
            }
          });
        }, '', false]
      }
    }
  }
  
  const script = document.createElement('script')
  script.src = 'https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'
  script.id = 'MathJax-script'
  script.async = true
  document.head.appendChild(script)
} else {
  MathJax.startup.document.state(0)
  MathJax.texReset()
  MathJax.typeset()
}</script><script>function loadValine () {
  function initValine () {
    const valine = new Valine(Object.assign({
      el: '#vcomment',
      appId: 'REc8eytE1gJDl3d8FkudLNlL-gzGzoHsz',
      appKey: 'gGO3y8I9oVlc4Cd5N1fizNPW',
      avatar: 'monsterid',
      serverURLs: '',
      emojiMaps: "",
      path: window.location.pathname,
      visitor: false
    }, null))
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://fastly.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !true) {
  if (true) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script id="canvas_nest" defer="defer" color="255,0,0" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-nest.min.js"></script><script src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = true;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-heart" src="https://fastly.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>